import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'

export default defineUniPages({
  // 全局样式
  globalStyle: {
    navigationBarTextStyle: 'black',
    navigationBarTitleText: 'hzy-uni-template',
    navigationBarBackgroundColor: '#ffffff',
    backgroundColor: '#f8f8f8',
    enablePullDownRefresh: false,
  },
  // TabBar 配置
  tabBar: {
    color: '#999999',
    selectedColor: '#32f08c',
    backgroundColor: '#ffffff',
    borderStyle: 'black',
    height: '50px',
    fontSize: '10px',
    iconWidth: '24px',
    spacing: '3px',
    list: [
      {
        pagePath: 'pages/index/index',
        iconPath: 'static/tabbar/home.png',
        selectedIconPath: 'static/tabbar/home-active.png',
        text: '首页',
      },
      {
        pagePath: 'pages/about/about',
        iconPath: 'static/tabbar/about.png',
        selectedIconPath: 'static/tabbar/about-active.png',
        text: '关于',
      },
    ],
  },
  // 页面配置
  pages: [
    // 首页
    {
      path: 'pages/index/index',
      style: {
        navigationBarTitleText: '首页',
        enablePullDownRefresh: false,
      },
    },
    // 关于页
    {
      path: 'pages/about/about',
      style: {
        navigationBarTitleText: '关于',
        enablePullDownRefresh: false,
      },
    },
  ],
})
